using System;
using System.Collections.Generic;
using System.Text;
using Jbe.TestSuite.TestDevice.Manager.Interface.Services;
using Jbe.TestSuite.TestDevice.FunctionGen.Interface.Constants;
using Microsoft.Practices.CompositeUI;

namespace Jbe.TestSuite.TestDevice.FunctionGen.ControlView.Services
{
    public class FGenControlViewFactory : IControlViewFactory 
    {
        private int controlViewCount = 0;

        public string ProfileName
        {
            get { return ProfileNames.FunctionGenerator; }
        }

        public IControlView Create(WorkItem workItem)
        {
            controlViewCount++;
            FGenControlView controlView = workItem.Services.AddNew<FGenControlView, IControlView>();
            controlView.Name = String.Format("{0:00} {1}", controlViewCount, ProfileName);
            return controlView;
        }
    }
}
